﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EzyGoEzySystem.Models;
using EzyGoEzySystem.Services;

namespace EzyGoEzySystem.Interfaces
{
    /// <summary>
    /// provide interface for ticket controller to get accounts from database using userid, password or phone number
    /// </summary>
    /// <author>Hoang Nguyen Nhat Tao</author>
    public interface ILoginService
    {
        ///// <summary>
        ///// Get accounts based on commuter's phone numbers
        ///// </summary>
        ///// <param name="phoneNumber">list of all commuter's phone numbers</param>
        ///// <returns>the list of all accounts having corresponding phone numbers</returns>
        //IEnumerable<Account> FetchAccount(IEnumerable<string> phoneNumbers);

        /// <summary>
        /// Get accounts based on commuter's MAC Address
        /// </summary>
        /// <param name="phoneNumber">list of all commuter's phone numbers</param>
        /// <returns>the list of all accounts having corresponding phone numbers</returns>
        IEnumerable<Account> FetchAccount(IEnumerable<string> macAddress, EzyGoEzyDBContext dbContext);

        /// <summary>
        /// Get accounts based on commuter's device MAC Address and phone number
        /// </summary>
        /// <param name="macAddresses"></param>
        /// <returns></returns>
        IEnumerable<Account> FetchAccount(IEnumerable<MacAddressPhoneNo> macPhoneInfos);

        /// <summary>
        /// Get accounts based on commuter's login information: emails and passwords
        /// if password is wrong, the account is not in the return list
        /// </summary>
        /// <param name="loginInfos">list of commuter's login information</param>
        /// <returns>the list of all accounts having corresponding login information</returns>
        IEnumerable<Account> FetchAccount(IEnumerable<LoginInformation> loginInfos);
    }
}
